﻿<phone:PhoneApplicationPage 
    x:Class="V5_Book.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.WP71"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <controls:Pivot Title="V5软件-小说阅读器">
            <!--枢轴项一-->
            <controls:PivotItem Header="最近阅读">
                <!--具有文字环绕的双线列表-->
                <ListBox x:Name="List1" Margin="0,0,-12,0" >
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,17" Width="432" Height="78">
                                <TextBlock Text="{Binding BookName}" TextWrapping="Wrap"/>
                                <TextBlock Text="{Binding LastTime}" TextWrapping="Wrap" />
                            </StackPanel>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PivotItem>
            <!--枢轴项二-->
            <controls:PivotItem Header="获取书籍">
                <StackPanel Margin="0,0,0,17">
                    <Button x:Name="btnGetBook1">
                        无限传书
                    </Button>
                    <Button x:Name="btnGetBook2">
                        微软SkyDrive
                    </Button>
                    <Button x:Name="btnGetBook3">
                        网站获取
                    </Button>
                </StackPanel>
            </controls:PivotItem>
            <!--枢轴项三-->
            <controls:PivotItem Header="其他设置">
                <ScrollViewer>
                    <StackPanel Margin="0,0,-12,0">
                        <Button x:Name="btnSettings1">
                            软件设置
                        </Button>
                        <Button x:Name="btnSettings2">
                            阅读设置
                        </Button>
                    </StackPanel>
                </ScrollViewer>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--演示 ApplicationBar 用法的示例代码-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="abbBookSetting" IconUri="/Images/System/appbar.settings.png" Text="软件设置" Click="abbBookSetting_Click" >
            </shell:ApplicationBarIconButton>
            <shell:ApplicationBarIconButton x:Name="abbBookList" IconUri="/Images/System/appbar.lines.horizontal.4.png" Text="书库列表" Click="abbBookList_Click"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>